<template>
  <!-- 后台首页 -->
  <div class="MaxBox">

    <!-- 图表大盒子 -->
    <div class="chartMaxBox">
      <order-chart :data="totalData"></order-chart>
        <!-- <line-chart></line-chart> -->
    </div>
  </div>
</template>

<script>
import {statsGoods} from '@/api/stats.js'
// 导入 echarts 公共组件
import OrderChart from '@/components/OrderChart.vue'


export default {
  data() {
    return {
      // 图标的数据
      totalData:'',
    };
  },
 components: {
    OrderChart,
  },
   
  methods: {

    // 请求chart
   async getTotalData(){
      let res = await statsGoods();
      // console.log(res);
      this.totalData=res.data.data;
      console.log(this.totalData);
    }
  },
 

  mounted() {
  },

  created(){
    this.getTotalData();
  },

};
</script>

<style lang="less" scoped>
.MaxBox {
  width: 100%;
  height: 100%;
}

.chartMaxBox {
  width: 100%;
  height: 450px;

}
</style>